package service;

import dao.VehicleDao;
import service.VehicleService;
import pojo.Vehicle;

import java.util.List;

public class VehicleServiceImpl implements VehicleService {
    private VehicleDao vehicleDao = new VehicleDaoImpl();

    @Override
    public int addVehicle(Vehicle vehicle) {
        return vehicleDao.addVehicle(vehicle);
    }

    @Override
    public Vehicle getVehicleByLicensePlate(String licensePlate) {
        return vehicleDao.getVehicleByLicensePlate(licensePlate);
    }

    @Override
    public int updateVehicle(Vehicle vehicle) {
        return vehicleDao.updateVehicle(vehicle);
    }

    @Override
    public int deleteVehicle(String licensePlate) {
        return vehicleDao.deleteVehicle(licensePlate);
    }

    @Override
    public List<Vehicle> getAllVehicles() {
        return vehicleDao.getAllVehicles();
    }

    @Override
    public int calculateTurnover() {
        return vehicleDao.calculateTurnover();
    }
}